﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace HotelManager.SqlHelper
{
    class getSqlConnection
    {
        static string strconn = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
        SqlConnection m_Con;  //声明链接对象

        /// <summary>构造函数/// </summary>
        public getSqlConnection()
        {

        }

        /// <summary>连接数据库/// </summary>
        public SqlConnection GetCon()
        {
            m_Con = new SqlConnection(strconn);
            m_Con.Open();
            return m_Con;
        }
    }
}
